import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import { message, FormModel, Button, Icon } from "ant-design-vue";
import { AxiosRequest } from "./utils/axios";
import "./setting/index";
import "@/utils/filters";
import { Component } from "vue-property-decorator";
import { directives } from "./utils/directives";

Vue.config.productionTip = true; // 打开生产环境提示
Vue.use(AxiosRequest); // axios
Vue.use(directives);
Vue.use(FormModel);
Vue.use(Button);
Vue.use(Icon);
Vue.prototype.$message = message;
Vue.prototype.$event = new Vue();

Component.registerHooks([
  "beforeRouteEnter",
  "beforeRouteLeave",
  "beforeRouteUpdate",
]);

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
